package cz.muni.fi.pa165.rentalofconstructionmachinery.service;

import cz.muni.fi.pa165.rentalofconstructionmachinery.dto.CustomerDTO;
import cz.muni.fi.pa165.rentalofconstructionmachinery.dto.MachineDTO;
import cz.muni.fi.pa165.rentalofconstructionmachinery.dto.RentalDTO;
import java.util.List;

/**
 *
 * @author David Domonkos
 */
public interface RentalService {
    
    /**
     * Add a new rental entry.
     * 
     * @param rental The rental object. Must not be null!
     */
    public void addRental(RentalDTO rental);
    
    /**
     * Delete rental entry.
     * 
     * @param rental The rental object. Must not be null!
     */
    public void removeRental(RentalDTO rental);
    
    /**
     * Modify rental entry.
     * 
     * @param rental The rental object. Must not be null!
     */
    public void modifyRental(RentalDTO rental);
    
    /**
     * List all existing rentals.
     * 
     * @return List of all existing rentals.
     */
    public List<RentalDTO> getAllRentals();
    
    /**
     * Get a particular rental by its ID.
     * 
     * @param id Must not be null!
     * @return Null, if rental with such ID does not exist.
     */
    public RentalDTO getRentalById(Long id);
    
    /**
     * Get all rentals associated with a specified customer.
     * 
     * @param customer Must not be null.
     * @return List of rentals.
     */
    public List<RentalDTO> getRentalsByCustomer(CustomerDTO customer);
    
    /**
     * Get all rentals associated with a specified machine.
     * 
     * @param machine Must not be null.
     * @return List of rentals.
     */
    public List<RentalDTO> getRentalsByMachine(MachineDTO machine);
}
